package com.jiazhong.cloud.governance.consumer.feign.controller;

import com.jiazhong.cloud.governance.consumer.feign.feign.ProviderFeign;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/consumer_feign")
public class ConsumerFeignController {
    @Resource
    private ProviderFeign providerFeign;

    @GetMapping
    public String hello() {
        return providerFeign.hello();
    }

    @GetMapping("/a1")
    public String a(@RequestParam("name") String name) {
        return providerFeign.a1(name);
    }
}
